<?php


/*
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the 
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program.  If not, see 
 * <http://www.gnu.org/licenses/>.
*/


// no direct access
defined('_JEXEC') or die('Restricted access');


jimport('joomla.application.component.view');


class MassMailerViewCampaigns extends JView
{
	function display($tpl = null)
	{
		$document = JFactory::getDocument();
		$document->setTitle(JText::_('Campaigns Administration'));

		JToolBarHelper::title(JText::_('Campaigns Administration'), 'generic.png');
		JToolBarHelper::deleteList();
		JToolBarHelper::editListX();
		JToolBarHelper::addNewX();

		parent::display($tpl);
	}

	function getLists()
	{
		global $mainframe;

		// Get some variables from the request
		$filter_order     = $mainframe->getUserStateFromRequest('mm_campaigns.filter_order',     'filter_order',     '', 'cmd');
		$filter_order_Dir = $mainframe->getUserStateFromRequest('mm_campaigns.filter_order_Dir', 'filter_order_Dir', '', 'word');
		$search           = $mainframe->getUserStateFromRequest('mm_campaigns.search',           'search',           '', 'string');
		$search           = JString::strtolower($search);

		// table ordering
		$lists['order_Dir'] = $filter_order_Dir;
		$lists['order']     = $filter_order;

		// search filter
		$lists['search'] = $search;

		return $lists;
	}
}


?>
